package flex.cc.store.enums;

import com.google.common.collect.Lists;
import com.google.common.collect.Maps;

import java.util.List;
import java.util.Map;

/**
 * @author KongShiYu
 * @create 2022/1/6
 * @desc
 */
public enum ActivityNameEnum {
    INIT("5044", "车辆外观服务"),
    ONE("5164", "适配保养"),
    TWO("5050", "打蜡"),
    THREE("5221", "臭氧杀菌"),
    FOUR("4080", "空调清洗"),
    FIVE("5444", "30公里酒后代驾"),
    
    SIX("3001", "玻璃清洁度服务"),
	SEVEN("4060", "车辆轮胎服务"),
	EIGHT("5322", "车辆喷漆服务"),
	NINE("5048", "车辆外观精致服务"),
	TEN("5444", "易出行服务(30公里)"),
	TEN1("YH0005", "百万CAR-T卡"),
	TEN2("YH0004", "云医购药卡"),
	TEN3("YH0003", "六心康护卡"),
	TEN4("YH0002", "电话医生"),
	TEN5("YH0001", "车险人伤卡"),
	TEN6("4050", "四轮换位(不含动平衡)"),
	
	TEN7("5522", "保养代金券(100元)"),
	TEN8("5547", "喷漆代金券(50元)"),
	TEN9("6833", "专家顾问(车辆故障答疑)"),
	TEN10("4051", "安全检测)");

    String type;
    String name;

    ActivityNameEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static String getName(String type) {
        for (ActivityNameEnum ele : ActivityNameEnum.values()) {
            if (type.equals(ele.getType())) {
                return ele.getName();
            }
        }
        return "";
    }

    public static ActivityNameEnum getEnum(String type) {
        for (ActivityNameEnum ele : ActivityNameEnum.values()) {
            if (type.equals(ele.getType())) {
                return ele;
            }
        }
        return null;
    }

    public static List<Map<String, Object>> getList() {
        List<Map<String, Object>> list = Lists.newArrayList();
        for (ActivityNameEnum ele : ActivityNameEnum.values()) {
            Map<String, Object> map = Maps.newHashMap();
            map.put("key", ele.getType());
            map.put("value", ele.getName());
            list.add(map);
        }
        return list;
    }
}

